//
//  Stack.m
//  OR_1
//
//  Created by Luboš Kulič on 8/18/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "Stack.h"


@implementation NSMutableArray (StackCategory)

+stack {
	return [self array];
}

-(void) push:(id)object {
	[self addObject:object];
}

-(id) pop{
	//NSLog(@"pop from: %@", self);
	
	id o = [[[self lastObject] retain]autorelease];
	if([self count]) {
		[self removeLastObject];
	}
	return o;
}

@end
